import request from '../utils/request'

// 获取页目列表
export function getDeviceTypeList (index, pageSize) {
  return request.get('/system/deviceType/deviceTypeList', {
    params: {
      index,
      pageSize
    }
  })
}

// 根据id获取详情
export function getDeviceByid (id) {
  return request.get('/system/deviceType/deviceTypeById', { params: { id } })
}

// 删除
export function deleteDeviceByid (id) {
  return request.post(
    'system/deviceType/deleteDeviceType',
    {},
    { params: { id } }
  )
}

// 添加设备类型
export function DeviceTypeAdd (item) {
  return request.post('system/deviceType/deviceType', item)
}

// 编辑设备类型
export function writeDviceType (item, id) {
  return request.post(`system/deviceType/updateDeviceType?id=${id}`, item)
}

// 删除检测项数据
export function deleteMonitorByid (id) {
  return request.post(`system/deviceType/deleteDeviceMonitor?id=${id}`)
}
